package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OosDemo {
    public static void main(String[] args) throws IOException {
        String name = "范传奇";
        int age = 25;
        String gender = "男";
        String[] otherInto = {"帅","技术高","玩游戏好","有钱","二阶段老师"};
        Person person = new Person(name,age,gender,otherInto);

        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);

        oos.writeObject(person);
        System.out.println("写出完毕");
        oos.close();

    }
}
